from django.contrib import admin
from .models import AITaskLog, AIMatchLog


@admin.register(AITaskLog)
class AITaskLogAdmin(admin.ModelAdmin):
    list_display = ['user', 'task_type', 'model_name', 'status', 'tokens_used', 'created_at']
    list_filter = ['task_type', 'status', 'created_at']
    search_fields = ['user__username', 'model_name']


@admin.register(AIMatchLog)
class AIMatchLogAdmin(admin.ModelAdmin):
    list_display = ['group', 'task_title', 'required_time', 'match_score', 'created_at']
    list_filter = ['created_at']
    search_fields = ['group__name', 'task_title']
